The present invention relates generally to process control networks and, more specifically, to the use of indirect referencing in process control routines to enable advanced process control.
Process control networks, such as those used in chemical, petroleum or other processes, generally include a centralized process controller communicatively coupled to one or more field devices which may be, for example, valve positioners, switches, sensors (such as temperature, pressure and flow rate sensors), etc. These field devices may perform physical control functions within the process (such as opening or closing a valve), may take measurements within the process for use in controlling the operation of the process or may perform any other desired function within the process. Process controllers have historically been connected to field devices via one or more analog signal lines or buses which may carry, for example, 4-20 mA (milliamp) signals to and from the field devices. More recently, however, the process control industry has developed a number of standard, open, digital or combined digital and analog communication protocols such as the FOUNDATION(trademark) FIELDBUS (hereinafter xe2x80x9cFieldbusxe2x80x9d), HART(copyright), PROFIBUS(copyright), WORLDFIP(copyright), Device-Net(copyright) and CAN protocols which can be used to implement communications between a controller and field devices. Generally speaking, the process controller receives signals indicative of measurements made by one or more field devices and/or other information pertaining to the field devices, uses this information to implement a typically complex control routine and generates control signals which are sent via the signal lines or buses to the field devices to thereby control the operation of the process.
Certain types of process control networks, such as those used in batch processes, typically include multiple sets of replicated equipment designed to have the same or similar equipment which performs essentially the same function within the processes. Thus, for example, a cookie manufacturing plant may have multiple sets of mixing equipment, multiple sets of baking equipment, and multiple sets of packaging equipment, with all of the individual mixers being capable of operating in parallel and of being connected to operate in series with any of the baking equipment and any of packaging equipment. In such a system, it is desirable to be able to use the same control algorithm or routine to control the operation of any particular set of replicated equipment to thereby reduce the number of control routines that must be created and stored within the controller. However, these control algorithms must be written so that, when executed, they specify the equipment of a particular unit being used at the time.
In some prior art systems, a generalized control routine using alias names (i.e., unspecified variables) to designate the specific equipment that varied from replicated unit to replicated unit was created in a workstation. To enable a system controller to perform the generalized control routine on a particular unit, the generalized program was instantiated using an alias resolution table created for a particular unit. Such an alias resolution table included a definition for each alias name used in the generalized control routine and was used to create an executable instance of the generalized control routine by substituting the values in the alias resolution table of the particular unit for the alias names in the control routine. This instantiated control routine was then downloaded into and stored in the controller and, thereafter, was used during run-time to perform a control operation (or phase) on the particular unit. However, using this system, the controller had to store a separate instantiated (resolved) control routine for each of the different ones of the replicated units, thereby requiring a lot of memory space within the controller, especially if the controller was used to control a large number of similar units and was being used to perform a lot of different operations or phases on each unit (as separate instantiated control routines were required for each phase for each unit).
In another prior art system, the generalized control routine was stored in the controller and was used during run-time to perform the programed operation or phase on any of the replicated units to which it was applied. In this case, the alias names were resolved on the fly during run-time using the alias resolution table for the particular unit being controlled. However, in this configuration, if a change was to be made to the generalized control routine that was currently being run by the controller, the run of that routine had to be aborted to enable a new generalized control routine to be downloaded into the controller. This resulted in the loss of the materials, time, etc. associated with the aborted run of the process.
Furthermore, neither of these known systems enabled a single generic process control routine with alias names to be applied across multiple or different classes of units or equipment. In fact, in these prior art systems, a control routine for a phase was limited to use with one unit class, i.e., one specific type of hardware unit, such as reactors, or mixers, etc. As a result, a first generic process control routine had to be created and stored to, for example, fill a reactor vessel while a second generic process control routine had to be created and stored to fill mixing tanks and a third one had to be created and stored to fill feeder tanks, resulting in the creation of many different generic control routines for performing essentially the same function on different types of hardware.
Likewise, none of these prior art systems enabled the generic control routine to account for differences between the equipment associated with different modules of a particular type of hardware unit. For example, if a first reactor unit had an electrical heating element associated therewith and a second reactor unit had a steam heating element associated therewith, a different generic control routine had to be developed for heating each of these reactor units to account for the differences in the control of the electrical heater and the steam heater, even though the process only required heating to be performed, with the type of heating being irrelevant. This problem generally occurs when additional units or modules (such as reactor modules) are added to a process control system at various times and, because of cost, new advances in hardware, etc., the newly added modules, while being designed to perform essentially the same function as the existing modules, have slightly different equipment associated therewith.
Still further, these prior art systems had no easy method of specifying a parameter to be identified during run-time of the process control routine for any phase of a process. In fact, in most prior art systems having indirect referencing, the alias resolution table was used to resolve alias names when the process control routine was configured or put into machine readable code, which was before run-time. To enable a variable to be changed or specified during run-time, one prior art system provided an addressing scheme, such as an address array, into which references or pointers could be, placed during run-time so that, when the control program reached an instruction referencing one of the addresses in the array, the program would go to the device or position referred to by the contents of the specified address. However, there was no way to tell if the contents of the referenced address pointed to a valid device or to a proper place within the control routine during run-time. If the pointer was invalid, the program would be suspended and not continue, which caused production to stop. Still further, this addressing scheme was complex and hard to use properly because it required a detailed knowledge of the address array holding the pointers and knowledge as to which address of the array was being used by the control routine at which times. Thus, it required a lot of work on the part of the designer and the user to assure that a correct pointer was stored in the correct address at the correct time to prevent the control routine from suspending during run-time.
A process control system includes one or more process control routines that enable indirect referencing using alias names and/or dynamic reference parameters. A generic process control routine is written to include alias names and this generic process control routine is stored in a controller that controls a process having, for example, replicated equipment (replicated units) therein. Before execution of a process control function on a particular unit, an instance of the generic routine that controls that function is created, in which the alias names in the generic control routine are replaced by parameters defined in an alias resolution table for the particular unit. The controller then executes the instantiated version of the generic routine to control operation of the unit. This reduces the memory requirements of the controller because it allows the controller to store only the generic routine and the instantiated versions of that routine that are currently running, instead of storing an instantiated version of the generic routine for each and every unit at all times. Furthermore, this enables the generic control routine to be changed while an instance thereof is executing without causing the executing routine to abort.
If desired, the generic program can have multiple algorithms associated therewith, wherein each of the different algorithms is designed to control different units having somewhat different hardware, even though these different units perform essentially the same function within the process control system. When an instantiated version of the generic program is created, the controller determines which of the multiple algorithms of the generic routine is to be used based on a stored indication identifying the hardware configuration of the particular unit for which the instantiated control routine is being created. The system also enables a control routine to be created for and applied to multiple unit classes or different types of hardware used to perform different functions within the process control system. In this case, a configuration routine may assure that an alias definition exists for each alias name in every alias resolution table associated with the different classes of units to which the generic process control routine is to be applied. This enables fewer generic control routines to be written and stored in the controller because a single generic control routine may be written and used to perform a particular function on different types of equipment used for different purposes within the process control system.
Moreover, the process control routine may use one or more dynamic reference parameters to enable a field, device, parameter, etc. to be specified after the instantiated executable program has been created, i.e., to enable a field to be referenced dynamically at or during run-time. The dynamic reference parameter has multiple attributes including, for example, a reference attribute that stores a pointer, a path or a tag to the referenced device, field, parameter, etc. and a connection attribute that identifies whether an actual connection to the field specified by the reference attribute can be made, e.g., whether the reference attribute defines a valid field within the process control system configuration. The dynamic reference parameter may also include attributes that enable reading of and/or writing to the field specified by the reference attribute as a string or as a numerical value. Still further, the dynamic reference parameter may include one or more attributes that allow a read of one or more status values associated with the field specified by the reference attribute including, for example, the status of that field and the status of the last write to that field.